#pragma once
#include <stdio.h>
#include <stdlib.h>

typedef char TreeElemType;
typedef struct Node{
    TreeElemType data;
    struct Node *left;
    struct Node *right;
}BinTreeNode, *BinTree;

//先序序列创建二叉树
void create(BinTree &T){
    char ch;
    scanf("%c", &ch);
    //过滤回车
    // getchar();
    if(ch == '#'){	//标识空
        T = NULL;
    }else{
        //创建节点
        T = (BinTreeNode *)malloc(sizeof(BinTreeNode));
        T->data = ch;
        create(T->left);
        create(T->right);
    }
}
